package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.WFStep;
import com.sa.ibiz.demo.demo.domain.WFUser;

/**
 * 实体[WFStepActor] 数据对象
 */
@TableName(value = "T_SRFWFSTEPACTOR",resultMap = "WFStepActorResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFStepActor extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFStep wfstep;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFUser originalwfuser;
    private String actorid;
    private Integer actortype;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    private Timestamp finishdate;
    private Timestamp firstreadtime;
    private String iaactions;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer isfinish;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer isreadonly;
    private String memo;
    private String originalwfuserid;
    private String originalwfusername;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer readflag;
    private Integer remindercount;
    private String roleid;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    private String wfinstanceid;
    @TableId(value= "wfstepactorid",type=IdType.UUID)//指定主键生成策略
    private String wfstepactorid;
    private String wfstepactorname;
    private String wfstepid;
    private String wfstepname;
    /**
     *  设置属性值[工作流用户]
     *  @param actorid
     */
    public void setActorid(String actorid){
        if(StringUtils.isEmpty(actorid))
            actorid=null;
        this.actorid = actorid;
        this.set("actoriddirtyflag",true);
    }
    /**
     *  获取属性值[工作流用户]
     */
    public String getActorid(){
        return this.actorid;
    }
    /**
     *  重置属性值[工作流用户]
     */
    public void resetActorid(){
        this.set("actoriddirtyflag",false);
        this.actorid = null;
    }
    /**
     *  设置属性值[用户类型]
     *  @param actortype
     */
    public void setActortype(Integer actortype){
        this.actortype = actortype;
        this.set("actortypedirtyflag",true);
    }
    /**
     *  获取属性值[用户类型]
     */
    public Integer getActortype(){
        return this.actortype;
    }
    /**
     *  重置属性值[用户类型]
     */
    public void resetActortype(){
        this.set("actortypedirtyflag",false);
        this.actortype = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[完成时间]
     *  @param finishdate
     */
    public void setFinishdate(Timestamp finishdate){
        this.finishdate = finishdate;
        this.set("finishdatedirtyflag",true);
    }
    /**
     *  获取属性值[完成时间]
     */
    public Timestamp getFinishdate(){
        return this.finishdate;
    }
    /**
     *  重置属性值[完成时间]
     */
    public void resetFinishdate(){
        this.set("finishdatedirtyflag",false);
        this.finishdate = null;
    }
    /**
     *  设置属性值[查看时间]
     *  @param firstreadtime
     */
    public void setFirstreadtime(Timestamp firstreadtime){
        this.firstreadtime = firstreadtime;
        this.set("firstreadtimedirtyflag",true);
    }
    /**
     *  获取属性值[查看时间]
     */
    public Timestamp getFirstreadtime(){
        return this.firstreadtime;
    }
    /**
     *  重置属性值[查看时间]
     */
    public void resetFirstreadtime(){
        this.set("firstreadtimedirtyflag",false);
        this.firstreadtime = null;
    }
    /**
     *  设置属性值[允许交互操作]
     *  @param iaactions
     */
    public void setIaactions(String iaactions){
        if(StringUtils.isEmpty(iaactions))
            iaactions=null;
        this.iaactions = iaactions;
        this.set("iaactionsdirtyflag",true);
    }
    /**
     *  获取属性值[允许交互操作]
     */
    public String getIaactions(){
        return this.iaactions;
    }
    /**
     *  重置属性值[允许交互操作]
     */
    public void resetIaactions(){
        this.set("iaactionsdirtyflag",false);
        this.iaactions = null;
    }
    /**
     *  设置属性值[是否完成]
     *  @param isfinish
     */
    public void setIsfinish(Integer isfinish){
        this.isfinish = isfinish;
        this.set("isfinishdirtyflag",true);
    }
    /**
     *  获取属性值[是否完成]
     */
    public Integer getIsfinish(){
        return this.isfinish;
    }
    /**
     *  重置属性值[是否完成]
     */
    public void resetIsfinish(){
        this.set("isfinishdirtyflag",false);
        this.isfinish = null;
    }
    /**
     *  设置属性值[是否只读]
     *  @param isreadonly
     */
    public void setIsreadonly(Integer isreadonly){
        this.isreadonly = isreadonly;
        this.set("isreadonlydirtyflag",true);
    }
    /**
     *  获取属性值[是否只读]
     */
    public Integer getIsreadonly(){
        return this.isreadonly;
    }
    /**
     *  重置属性值[是否只读]
     */
    public void resetIsreadonly(){
        this.set("isreadonlydirtyflag",false);
        this.isreadonly = null;
    }
    /**
     *  设置属性值[备注]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[备注]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[备注]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfuserid
     */
    public void setOriginalwfuserid(String originalwfuserid){
        if(StringUtils.isEmpty(originalwfuserid))
            originalwfuserid=null;
        this.originalwfuserid = originalwfuserid;
        this.set("originalwfuseriddirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfuserid(){
        return this.originalwfuserid;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfuserid(){
        this.set("originalwfuseriddirtyflag",false);
        this.originalwfuserid = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfusername
     */
    public void setOriginalwfusername(String originalwfusername){
        if(StringUtils.isEmpty(originalwfusername))
            originalwfusername=null;
        this.originalwfusername = originalwfusername;
        this.set("originalwfusernamedirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfusername(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.originalwfusername)&&(!StringUtils.isEmpty(this.getOriginalwfuserid())) && this.getOriginalwfuser()!=null)
        {
            this.originalwfusername = this.getOriginalwfuser().getWfusername();
            this.set("originalwfusernamedirtyflag",true);
        }
        return this.originalwfusername;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfusername(){
        this.set("originalwfusernamedirtyflag",false);
        this.originalwfusername = null;
    }
    /**
     *  设置属性值[是否已读]
     *  @param readflag
     */
    public void setReadflag(Integer readflag){
        this.readflag = readflag;
        this.set("readflagdirtyflag",true);
    }
    /**
     *  获取属性值[是否已读]
     */
    public Integer getReadflag(){
        return this.readflag;
    }
    /**
     *  重置属性值[是否已读]
     */
    public void resetReadflag(){
        this.set("readflagdirtyflag",false);
        this.readflag = null;
    }
    /**
     *  设置属性值[督促次数]
     *  @param remindercount
     */
    public void setRemindercount(Integer remindercount){
        this.remindercount = remindercount;
        this.set("remindercountdirtyflag",true);
    }
    /**
     *  获取属性值[督促次数]
     */
    public Integer getRemindercount(){
        return this.remindercount;
    }
    /**
     *  重置属性值[督促次数]
     */
    public void resetRemindercount(){
        this.set("remindercountdirtyflag",false);
        this.remindercount = null;
    }
    /**
     *  设置属性值[角色用户]
     *  @param roleid
     */
    public void setRoleid(String roleid){
        if(StringUtils.isEmpty(roleid))
            roleid=null;
        this.roleid = roleid;
        this.set("roleiddirtyflag",true);
    }
    /**
     *  获取属性值[角色用户]
     */
    public String getRoleid(){
        return this.roleid;
    }
    /**
     *  重置属性值[角色用户]
     */
    public void resetRoleid(){
        this.set("roleiddirtyflag",false);
        this.roleid = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstanceid(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfinstanceid)&&(!StringUtils.isEmpty(this.getWfstepid())) && this.getWfstep()!=null)
        {
            this.wfinstanceid = this.getWfstep().getWfinstanceid();
            this.set("wfinstanceiddirtyflag",true);
        }
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[工作流步骤操作者标识]
     *  @param wfstepactorid
     */
    public void setWfstepactorid(String wfstepactorid){
        if(StringUtils.isEmpty(wfstepactorid))
            wfstepactorid=null;
        this.wfstepactorid = wfstepactorid;
        this.set("wfstepactoriddirtyflag",true);
    }
    /**
     *  获取属性值[工作流步骤操作者标识]
     */
    public String getWfstepactorid(){
        return this.wfstepactorid;
    }
    /**
     *  重置属性值[工作流步骤操作者标识]
     */
    public void resetWfstepactorid(){
        this.set("wfstepactoriddirtyflag",false);
        this.wfstepactorid = null;
    }
    /**
     *  设置属性值[工作流步骤操作者名称]
     *  @param wfstepactorname
     */
    public void setWfstepactorname(String wfstepactorname){
        if(StringUtils.isEmpty(wfstepactorname))
            wfstepactorname=null;
        this.wfstepactorname = wfstepactorname;
        this.set("wfstepactornamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流步骤操作者名称]
     */
    public String getWfstepactorname(){
        return this.wfstepactorname;
    }
    /**
     *  重置属性值[工作流步骤操作者名称]
     */
    public void resetWfstepactorname(){
        this.set("wfstepactornamedirtyflag",false);
        this.wfstepactorname = null;
    }
    /**
     *  设置属性值[步骤角色_步骤]
     *  @param wfstepid
     */
    public void setWfstepid(String wfstepid){
        if(StringUtils.isEmpty(wfstepid))
            wfstepid=null;
        this.wfstepid = wfstepid;
        this.set("wfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[步骤角色_步骤]
     */
    public String getWfstepid(){
        return this.wfstepid;
    }
    /**
     *  重置属性值[步骤角色_步骤]
     */
    public void resetWfstepid(){
        this.set("wfstepiddirtyflag",false);
        this.wfstepid = null;
    }
    /**
     *  设置属性值[流程步骤]
     *  @param wfstepname
     */
    public void setWfstepname(String wfstepname){
        if(StringUtils.isEmpty(wfstepname))
            wfstepname=null;
        this.wfstepname = wfstepname;
        this.set("wfstepnamedirtyflag",true);
    }
    /**
     *  获取属性值[流程步骤]
     */
    public String getWfstepname(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfstepname)&&(!StringUtils.isEmpty(this.getWfstepid())) && this.getWfstep()!=null)
        {
            this.wfstepname = this.getWfstep().getWfplogicname();
            this.set("wfstepnamedirtyflag",true);
        }
        return this.wfstepname;
    }
    /**
     *  重置属性值[流程步骤]
     */
    public void resetWfstepname(){
        this.set("wfstepnamedirtyflag",false);
        this.wfstepname = null;
    }
     /**
     *  获取主实体关联数据[WFStep]
     */
    public WFStep getWfstep() {
        return wfstep;
    }
    /**
     *  设置主实体关联数据[WFStep]
     */
    public void setWfstep(WFStep wfstep) {
        this.wfstep = wfstep;
    }

     /**
     *  获取主实体关联数据[WFUser]
     */
    public WFUser getOriginalwfuser() {
        return originalwfuser;
    }
    /**
     *  设置主实体关联数据[WFUser]
     */
    public void setOriginalwfuser(WFUser originalwfuser) {
        this.originalwfuser = originalwfuser;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetActorid();
        resetActortype();
        resetCreatedate();
        resetCreateman();
        resetFinishdate();
        resetFirstreadtime();
        resetIaactions();
        resetIsfinish();
        resetIsreadonly();
        resetMemo();
        resetOriginalwfuserid();
        resetOriginalwfusername();
        resetReadflag();
        resetRemindercount();
        resetRoleid();
        resetUpdatedate();
        resetUpdateman();
        resetWfinstanceid();
        resetWfstepactorid();
        resetWfstepactorname();
        resetWfstepid();
        resetWfstepname();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
    	//联合主键
        String primaryKey ="";
        primaryKey+=this.getWfstepid();
        primaryKey+="||";
        primaryKey+=this.getActorid();
        return  DigestUtils.md5DigestAsHex(primaryKey.getBytes());
    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFStepActor copyTo(WFStepActor targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFStepActor.class, WFStepActor.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfstepactorid();
		return targetEntity;
	}
}